<?php
    $autoload_path = array('lib','controller');
    function get_autoload_path($classname){
        global $autoload_path;
        foreach($autoload_path as $v){
            $path = __DIR__.DIRECTORY_SEPARATOR.$v.DIRECTORY_SEPARATOR.$classname.'.class.php';
            if(file_exists($path)){
                require $path;
                break;
            }
        }
    }
    spl_autoload_register('get_autoload_path');
